﻿/*************************************************************************
File:   as/strm1.as
Author: Duykham
UpDate: 05/11/2006
TODO:
/*************************************************************************/
trace ("#included: strm1.as");
///////////////////////////////////////////////////////////////////////////
//TODO: variables

//Tao mot ket noi toi FMS
myConnection = new NetConnection ();
myConnection.connect (_root.CFG.fmsApp);


var rsoCameras;
//var nameStream;
_global.arrayStream;

//Cac doi tuong Component//
var cam_cb : mx.controls.List;
rsoCameras = SharedObject.getRemote ("cams", myConnection.uri, true);
rsoCameras.connect (myConnection);
rsoDateMessages = clock.strDate;

//////////////////////////////////////////////
//////// 
cam_cb.multipleSelection = true;

///////////////////////////////////////////////////////////////////////////
//TODO: functions

rsoCameras.onSync = function (info)
{
	var camList = this.data.cams;
	cam_cb.dataProvider = camList;
};


start_btn.onRelease = function ()
{
	if(cam_cb.value != undefined && cam_cb.value != "")
	{
		//_root.nameStream = cam_cb.value;
		_global.arrayStream = cam_cb.selectedItems;
		gotoAndStop("strm3");
	}
};

cam_cb.setStyle ("themeColor", "haloBlue");
cam_cb.rowHeight = 30;